<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>后台管理</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<meta http-equiv="Cache-Control" content="no-store" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="0" />
	
	<link rel="stylesheet" href="${ctx}/statics/css/reset.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="${ctx}/statics/css/style.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="${ctx}/statics/css/validationEngine.jquery.css" media="screen"/>
	<link rel="stylesheet" href="${ctx}/statics/css/invalid.css" type="text/css" media="screen" />	
		
	<script type="text/javascript" src="${ctx}/statics/scripts/jquery-1.8.2.min.js" language="javascript"></script>
	<script type="text/javascript" src="${ctx}/statics/scripts/simpla.jquery.configuration.js"></script>
	<script type="text/javascript" src="${ctx}/statics/scripts/facebox.js"></script>
	<script type="text/javascript" src="${ctx}/statics/scripts/jquery.wysiwyg.js"></script>
	<script type="text/javascript" src="${ctx}/statics/scripts/jquery.validationEngine-zh_CN.js"></script>
	<script type="text/javascript" src="${ctx}/statics/scripts/jquery.validationEngine.js"></script>
	</head>
  
	<body class="body-top">
	<div id="body-wrapper">
		
		<div id="main-content">
		
			<ul class="shortcut-buttons-set">
				<li><a class="shortcut-button" href="#"><span>
					<img src="${ctx}/statics/images/icons/pencil_48.png" alt="icon" /><br />
					Write an Article
				</span></a></li>
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="${ctx}/statics/images/icons/paper_content_pencil_48.png" alt="icon" /><br />
					f
				</span></a></li>
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="${ctx}/statics/images/icons/image_add_48.png" alt="icon" /><br />
					Upload an
				</span></a></li>
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="${ctx}/statics/images/icons/clock_48.png" alt="icon" /><br />
					Add an Event
				</span></a></li>
				
				<li><a class="shortcut-button" href="#messages" rel="modal"><span>
					<img src="${ctx}/statics/images/icons/comment_48.png" alt="icon" /><br />
					Open Modal
				</span></a></li>
				
			</ul>
			<div class="clear"></div>
			
			<%
			Runtime runtime = Runtime.getRuntime();
	        long freeMemoery = runtime.freeMemory();
	        long totalMemory = runtime.totalMemory();
	        long usedMemory = totalMemory - freeMemoery;
	        long maxMemory = runtime.maxMemory();
	        long useableMemory = maxMemory - totalMemory + freeMemoery;
			%>
			<table border="0">
				<tr>
					<td>操作系统:</td>
					<td><% out.print(System.getProperty("os.name") + "&nbsp;" + System.getProperty("os.version")+ "&nbsp;" + System.getProperty("os.arch")); %></td>
				</tr>
				<tr>
					<td>JAVA虚拟机:</td>
					<td><% out.print(System.getProperty("java.runtime.name") + "&nbsp;" + System.getProperty("java.runtime.version")); %></td>
				</tr>
				<tr>
					<td>JAVA运行环境:</td>
					<td><% out.print(System.getProperty("java.vm.name") + "&nbsp;" + System.getProperty("java.vm.version")); %></td>
				</tr>
				<tr>
					<td>系统帐号:</td>
					<td><% out.print(System.getProperty("user.name")); %></td>
				</tr> 
				<tr>
					<td>内存(MB):</td>
					<td>已用:<%=usedMemory/1024/1024%> / 剩余:<%=useableMemory/1024/1024 %> / 最大:<%=maxMemory/1024/1024%></td>
				</tr> 
				<tr>
					<td>服务器名称:</td>
					<td><%=request.getServerName() %></td>
				</tr> 
				<tr>
					<td>WEB服务器名称:</td>
					<td><%=getServletContext().getServerInfo() %></td>
				</tr> 
			</table>
		
	</div>
	</body>
</html>
